<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="../../favicon.ico">
    <base href="<%=basePath%>">
    <title>用户注册</title>
    <jsp:include page="bs/bs.jsp"></jsp:include>
    <style type="text/css">


        .form-signin {
            max-width: 400px;
            margin: 0 auto;
        }.form-group {
             margin-bottom: 1px;
         }

    </style>
    <script type="text/javascript" src="js/md5.min.js"></script>
    <script>
      function check(){
           var pwd1 = $("#upwd").val();
           var pwd2 = $("#qrpwd").val();

           if(pwd1==pwd2){
               return true;
           }else{
                alert("两次输入的密码不一致");
               return false;
           }


      }

    </script>
</head>
<!-- NAVBAR
================================================== -->
<body>
<%--头部导航条--%>
<jsp:include page="common/top.jsp"></jsp:include>

<div class="container" >
    <form class="form-signin form-horizontal" onsubmit="return check()" action="${pageContext.request.contextPath}/register" method="post">
        <h2 class="form-signin-heading">用户注册</h2>
        <div class="form-group">
            <label class="col-sm-4" for="uname" ><h4>用户名</h4></label>
            <div class="col-sm-8">
                <input  type="text" name="uname" id="uname" class="form-control" placeholder="用户名" required autofocus>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-4" for="upwd" ><h4>密码</h4></label>
            <div class="col-sm-8">
                <input type="password" name="upwd" id="upwd" class="form-control" placeholder="密码" required>

            </div></div>
        <div class="form-group">
            <label class="col-sm-4" for="qrpwd" ><h4>确认密码</h4></label>
            <div class="col-sm-8">
                <input type="password" id="qrpwd" onblur="check()" class="form-control" placeholder="确认密码" required>

            </div></div>
        <div class="form-group">
            <label class="col-sm-4" for="drealname" ><h4>真实姓名</h4></label>
            <div class="col-sm-8">
                <input type="text" id="drealname" name="drealname"  class="form-control" placeholder="真实姓名" required>

            </div></div>
        <div class="form-group">
            <label class="col-sm-4" for="dsex" ><h4>性别</h4></label>
            <div class="col-sm-8">
                <label class="radio-inline">
                    <input type="radio" name="dsex" checked="checked" id="dsex" value="1"> 男
                </label>
                <label class="radio-inline">
                    <input type="radio" name="dsex" id="dsex" value="0"> 女
                </label>

            </div></div>


        <div class="form-group">
            <label class="col-sm-4" for="dage" ><h4>年龄</h4></label>
            <div class="col-sm-8">
                <input type="number" id="dage" name="dage" class="form-control" placeholder="年龄" required>

            </div></div>
        <div class="form-group">
            <label class="col-sm-4" for="dphone" ><h4>手机号</h4></label>
            <div class="col-sm-8">
                <input type="text" id="dphone" name="dphone" class="form-control" placeholder="手机号" required>
                <%--<input type="text" class="form-control" name="checkCode" style="width:50%;display: inline;" placeholder="验证码" id="yzm"><input type="button" id="btn" class="btn" onclick="getYzm()" value="点击获取验证码">--%>
            </div></div>
        <div class="form-group">
            <label class="col-sm-4" for="didcard" ><h4>身份证号</h4></label>
            <div class="col-sm-8">
                <input type="text" id="didcard" name="didcard" class="form-control" placeholder="身份证号" required>

            </div></div>
        <div class="form-group">
            <label class="col-sm-4" for="demail" ><h4>邮箱</h4></label>
            <div class="col-sm-8">
                <input type="email" id="demail" name="demail"  class="form-control" placeholder="邮箱" required>

            </div></div>
        <div class="form-group">
            <label class="col-sm-4" for="dqq" ><h4>QQ</h4></label>
            <div class="col-sm-8">
                <input type="number" id="dqq" name="dqq" class="form-control" placeholder="QQ" >
            </div></div>
        <button class="btn btn-lg btn-primary btn-block" type="submit">注册</button>
        <br>
        ${reg_info }
    </form>
</div>


<jsp:include page="common/footer.jsp"></jsp:include>


</body>
</html>

